// 2025/11/19
// 爬楼梯

class Solution {
public:
    int climbStairs(int n) {
        int prev2 = 1, prev1 = 1;
        for(int i = 2; i <= n; i++)
        {
            int tmp = prev1;
            prev1 += prev2;
            prev2 = tmp;
        }
        return prev1;
    }
};